<?php
/**
 * @filename IndexController.php 
 * @encoding UTF-8 
 * @author KangShuAn
 * @datetime 2014-10-28 14:07:52
 * @version 1.0
 * @Description
 */
class IndexController extends AdminController{
    /**
     * 后台首页
     */
    public function actionIndex(){
        $userinfo = ManageUser::model()->findByPk($this->user_id)->attributes;
        $lastlogin = explode('|', $userinfo['lastlogin']);
        $userinfo['last_ip'] = $lastlogin[0];
        $userinfo['last_time'] = $lastlogin[1];
        $groupinfo = ManageGroup::model()->findByPk($this->group_id);
        $this->smarty->assign('groupinfo', $groupinfo);
        $this->smarty->assign('userinfo', $userinfo);
        $this->smarty->assign('soft', $_SERVER['SERVER_SOFTWARE']);
        $this->smarty->display('index.tpl');
    }
}
